package com.atguigu10._enum.exer3;

/**
 * @author NoobMaster69  * @date 2024/6/2 0002 星期日 11:29
 */

class ColorTest {
    public static void main(String[] args) {
        System.out.println(Color.BLUE);
    }
}

enum Color {
    RED(255, 0, 0, "红色"),
    ORANGE(255, 128, 0, "橙色"),
    YELLOW(255, 255, 0, "黄色"),
    GREEN(0, 255, 0, "绿色"),
    CYAN(0, 255, 255, "青色"),
    BLUE(128, 0, 255, "蓝色"),
    PURPLE(128, 0, 255, "紫色");
    private final int red, green, blue;
    private final String description;

    Color(int red, int green, int blue, String description) {
        this.red = red;
        this.green = green;
        this.blue = blue;
        this.description = description;
    }

    @Override
    public String toString() {
        return name() + "(" + red + "," + green + "," + blue + ")->" + description;
    }
}
